<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	import="com.wavecoler.professor.dao.UserDAO, com.wavecoler.professor.objects.User"%>
<!DOCTYPE html>
<html lang='en'>
<head>

<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='COLER is a project made by ITESM' name='description' />
<title>Project COLER</title>
<!--[if lt IE 9]>
      <script src='//html5shim.googlecode.com/svn/trunk/html5.js'></script>
    <![endif]-->
<link href='//fonts.googleapis.com/css?family=Droid+Sans:400,700'
	rel='stylesheet' type='text/css' />
<link href='/css/coler-www.css' media='all' rel='stylesheet'
	type='text/css' />
<link href='/css/coler-print.css' media='print' rel='stylesheet'
	type='text/css' />
<link rel="stylesheet" href="/css/jquery-ui.css" type="text/css"
	media="all" />
<link rel="stylesheet" href="/css/ui.theme.css" type="text/css"
	media="all" />
<script type="text/javascript">
      var _kmq = _kmq || [];
      function _kms(u){
        setTimeout(function(){
          var s = document.createElement('script'); var f = document.getElementsByTagName('script')[0]; s.type = 'text/javascript'; s.async = true;
          s.src = u; f.parentNode.insertBefore(s, f);
        }, 1);
      }
      _kms('//i.kissmetrics.com/i.js');_kms('//doug1izaerwt3.cloudfront.net/1b8b4e53760dec5aa5590a59b34ad86c7d2ad081.1.js');
    </script>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript" src="jquery.ui.core.js"></script>
<script type="text/javascript" src="jquery.ui.widget.js"></script>
<script type="text/javascript" src="jquery.ui.datepicker.js"></script>
<script type="text/javascript">$(function() {
 		$( "#datepicker" ).datepicker();
	});</script>
</head>
<body id='home'>
	<% User usuario = (User) session.getAttribute("user"); %>

	<%! public static final int INSERT = 1;
      public static final int UPDATE = 2;
	  public static final int DELETE = 3;
	  public static final int DEACTIVATE = 4; %>

	<script type="text/javascript">var _kiq = _kiq || [];</script>
	<script type="text/javascript"
		src="//s3.amazonaws.com/ki.js/22254/4LN.js" async="true"></script>
	<script type="text/javascript">function comparaContrasena(){ 
    	var contrasena = document.usuarionuevo_form.password.value
    	var retype = document.usuarionuevo_form.passwordretype.value
    	var returnval;
    	if(contrasena == retype){
    		returnval = true;
    	}else{
    		returnval = false;
    	}
    	return returnval;
    	}</script>
	<script type="text/javascript"></script>
	<div class='topbar'>
		<div class='header'>
			<div class='container'>
				<h1 class='site-title'>
					<a href='/'
						title='Collaborative Learning Of Entity-Relationship Diagrams'>
						Coler </a>
				</h1>
				<ul class='nav'>
					<li><a class='' href='index.jsp'> Home </a></li>
					<li><a class='btn disabled'> Add New User </a></li>
					<li><a class='' href='AddProblem.jsp'> Create a New
							Problem </a></li>
					<li><a class='' href='AddSession.jsp'> Create a New
							Session </a></li>
					<li><a class='' href='AddGroup.jsp'> Create a New Group </a></li>
					<li><a class='btn primary' href='/' title='Log in to Fleetio'>
							Log Out </a></li>
					<li><a class='btn primary'
						href='../userAction?action=5&username=<%= usuario.getUserName() %>'
						title='Log in to Fleetio'> Delete Account </a></li>
				</ul>
			</div>
		</div>
	</div>

	<form name="modifyusuario_form" method="GET" action="../userAction"
		onSubmit="return comparaContrasena()">

		<br /> <br /> <input type="hidden" name="action" value="<%=UPDATE%>" />
		<table cellspacing=5 cellpadding=5 colspan=2 rowspan=2 align="center">
			<tr>
				<td>First Name:</td>
				<td><input type=text name="firstname"
					value="<%= usuario.getFirstName() %>" />*</td>
			</tr>
			<tr>
				<td>Middle Name:</td>
				<td><input type=text name="middlename"
					value="<%= usuario.getMiddleName() %>" /></td>
			</tr>
			<tr>
				<td>LastName:</td>
				<td><input type=text name="lastname"
					value="<%= usuario.getLastName() %>" />*</td>
			</tr>
			<tr>
				<td>Date of Birth:</td>
				<td><input type=text name="dateofbirth" id="datepicker"
					maxlength="50"
					value="<%= usuario.getBirthDay() +"/" + usuario.getBirthMonth() +"/"+ usuario.getBirthYear()  %>" />
				</td>
			</tr>
			<tr>
				<td>Gender:</td>
				<td><select name="gender" value="<%= usuario.getGender() %>">
						<option selected>---</option>
						<option value="M">M</option>
						<option value="F">F</option>
				</select></td>
			</tr>
			<tr>
				<td>Google Wave Account:</td>
				<td><input type=text name="username" maxlength="50"
					value="<%= usuario.getUserName() %>" />*</td>
			</tr>
			<tr>
				<td>Password:</td>
				<td><input type="password" name="password" maxlength="20"
					value="<%= usuario.getPassword() %>" />*</td>
			</tr>
			<tr>
				<td>Retype password:</td>
				<td><input type="password" name="passwordretype" maxlength="20" />*</td>
			</tr>
			<tr>
				<td>Professor?:</td>
				<td><input type=checkbox name="expert" />
				</td>
			</tr>

		</table>
		<br /> <br />
		<table align="center">
			<tr>
				<td></td>
				<td><input type="Submit" value="Save"
					style="height: 35px; width: 100px" /></td>

			</tr>

		</table>
	</form>


	<footer>
		<div class='container'>
			<div class='row'>
				<div class='span10'>
					<div class='row'>
						<div class='span3'>
							<h4>Project COLER</h4>
							<ul class='unstyled'>
								<li><a href='/'>Home</a></li>
								<li><a href='/why'>Why COLER?</a></li>
								<li><a href='/description'>Description</a></li>
								<li><a href='/objectives'>Objectives</a></li>
								<li><a href='/people'>People Involving</a></li>
							</ul>
						</div>
						<div class='span4'>
							<h4>More</h4>
							<ul class='unstyled'>
								<li><a href='/apachewave'>Apache-Wave</a></li>
							</ul>
						</div>
						<div class='span3'>
							<h4>ITESM</h4>
							<ul class='unstyled'>
								<li><a href='http://www.itesm.edu'>ITESM</a></li>
								<li><a
									href='http://www.itesm.edu/wps/wcm/connect/Campus/LAG/Laguna/'>Campus
										Laguna</a></li>
								<li><a
									href='http://www.itesm.edu/wps/wcm/connect/Campus/MTY/Monterrey'>Campus
										Monterrey</a></li>
							</ul>
						</div>
					</div>
				</div>
				<!--  <div class='span6'>
            <h4>
              Subscribe to our newsletter
            </h4>
            <p>
              Hear about new features, tips & other updates.
            </p>
            <form action='http://rarestep.us1.list-manage.com/subscribe/post?u=d4a006f9816053fb9b37816ea&amp;id=61cdd86e5c' id='newsletter_list_form' method='post' name='mc-embedded-subscribe-form' target='_blank'>
              <div class='clearfix'>
                <input class='span4' name='EMAIL' placeholder='email address' type='email' />
                <input class='btn' name='subscribe' type='submit' value='Subscribe' />
              </div>
            </form>
          </div>
        </div> -->
			</div>
			<div id='footer-floor'>
				<div class='container'>
					<div class='row'>
						<div class='span10'>
							<h3 id='phone'>+52 (81) 8358-200</h3>
							<p>
								&copy; 2012 <a href="http://www.itesm.edu"
									title="ITESM - Innovaci�n, creatividad, uso de tecnolog�a y esp�ritu emprendedor.">ITESM</a>.
								All Rights Reserved.
								<!-- &nbsp;<a href='/terms'>Terms</a>&nbsp;&&nbsp;<a href='/privacy'>Privacy</a>.  -->
							</p>
						</div>
						<div class='span3 ar' id='elsewhere-msg'>
							<h4>Stay in touch:</h4>
						</div>
						<div class='span3' id='elsewhere-icons'>
							<a class='twitter' href='http://twitter.com/cooler'>Twitter</a>
						</div>
					</div>
				</div>
			</div>
	</footer>
	</footer>

</body>
</html>